package com.hnevc.yourhealthmanager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("weight_record_table")
@ApiModel(value = "WeightRecord",description = "饮食记录数据，记录每一次的饮食情况")
public class WeightRecord {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;
    @ApiModelProperty(value = "用户ID")
    private Integer userId;
    @ApiModelProperty(value = "体重，单位千克")
    private Float weight;
    @ApiModelProperty(value = "称重时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Date weightTime;
    @ApiModelProperty(value = "称重方式，手工输入，设备输入")
    private String weightType;
}
